The present invention relates generally to data management, and particularly to managing data stored hierarchically.
Hierarchical data sets are useful and popular. Such data sets are generally composed of multiple records. In a hierarchical set of records, a record can have multiple “children,” which are related to the record and exist at a lower level of the hierarchy. Such a record is referred to as the “parent” record of the children records. The children of a record may have children, and so on, limited only by the size of the database. Within a set of children of a single record, it is often useful to order the children, such that there is a first child, a second child, and so on.
To date the utility of these hierarchical data sets has been limited by the efficiency of the tools available for managing the data. Conventional methods of storing hierarchical data in a database involve multiple expensive calls to update and/or query the database. For example, in order to select the second grandchild of a record, three queries are necessary. The first query selects the child of the record. The second query selects the first child of the child. The third query selects the second child of the child.